package net.taviscaron.drivenotes.api;

import com.google.gson.ExclusionStrategy;
import com.google.gson.FieldAttributes;
import net.taviscaron.drivenotes.shared.model.entity.User;

/**
 * Exclude User data from json serialization
 * @author Andrei Senchuk
 */
public class UserEntityExclusionStrategy implements ExclusionStrategy {
    public boolean shouldSkipField (FieldAttributes fa) {
        return fa.getDeclaredClass() == User.class;
    }

    public boolean shouldSkipClass (Class<?> type) {
        return false;
    }
}
